<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/intraMap3D.css"/>
<script type="text/javascript" src="js/intraMap3DFileIO.js"></script>
<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="js/intraMap3DInit.js"></script>
<script type="text/javascript" src="js/intraMap3DComm.js"></script>
<script type="text/javascript" src="js/intraMap3DMenu.js"></script>
<script language="javascript" for="zzz" event="OnPickGeometry(id)">
	/*도로 그리기*/	
	/* 다 그린 후 더블 클릭 */	
	if( pageType == "build" ){		
		var re = id + "^" + intraMap3D[0] + "^" + intraMap3D[1] + "^" + intraMap3D[2];
		zzz.DrawBuilding("build", "pattern", re);
	}
	if( pageType == "road" ){
		var	re=id+"^"+intraMap3D[0]+"^"+intraMap3D[1]+"^"+intraMap3D[2]+"^"+intraMap3D[3]+"^"+intraMap3D[4]+"^"+intraMap3D[5];
		zzz.DrawRoad("road", "", re);
	}
</script>
<script language="javascript" for="zzz" event="OnPickPoint(x,y,z)">
	/* 가로등 그리기 */
	if( pageType == "garo" ){
		rrr = "";//좌표값
		
		makelist3(x, y, z);
		makelist3(intraMap3D[0], intraMap3D[1], intraMap3D[2]);
		
		makelist(intraMap3D[3]);
		makelist(intraMap3D[4]);
		
		zzz.SetDrawInfo("Color", "255^255^0^32");
		zzz.DrawSideLight("sl", "", rrr);
	}

	/* 가시권 분석 */
	if( pageType == "distance" ){
		var gCnt = intraMap3D[6];
		
		if (gCnt == 0) { // 측정위치 저장
			intraMap3D[0] = x;
			intraMap3D[1] = y;
			intraMap3D[2] = z;
			
			intraMap3D[6] = ++gCnt;
		} else if (gCnt == 1) { // 목적위치 저장
			intraMap3D[3] = x;
			intraMap3D[4] = y;
			intraMap3D[5] = z;
			web3DComm(); // 가시권 시작 함수
		}
	}
</script>
<script language="javascript" for="zzz" event="OnPickPointNormal(x,y,z,nx,ny,nz)">
	/* 조망권 분석 */	
	if( pageType == "prospect" ){
		var data = x+"^"+y+"^"+(z+3)+"^"+nx+"^"+ny+"^"+nz;//오류 수정(클릭 값에서 약 키높이로 z 값 수정)
		zzz.AnalysisProspective("DrawWindow", false);
		alert("DrawWindow:"+data);
		//zzz.AnalysisProspective("Texture","");
		//alert("Texture:"+data);
		zzz.AnalysisProspective("start", data);
	}

	/* 평균경사도 분석 */
	if( pageType == "slope" ){
		zzz.AnalysisSlopeStart(x, y, z, nx, ny, nz);
	}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="javascript:Init('terrain', true);">
	<div id="pageComm" style="position:absolute; left:0px; width: 20%; text-align:center; color:white; background-color: navy;">
		<div id="pageCommTerrain"></div>
		<div id="pageCommMouse">MouseMode: Camera</div>
	</div>
	<div id="leftMenu" style="position:relative; top:35px; float: left; width: 20%;"><script>document.write(leftMenu)</script></div>
	<div id="intramap3d" style="width: 70%; height: 600px; float: left; margin: 2px 2px 2px 0px;">
		<div id="divInput"><script>document.write(inputDiv);</script></div>
		<div id="divTopMenu"><script>document.write(topMenu);</script></div>
		<div id="divSubMenu"><script>document.write(subMenu);</script></div>
		<div id="active">
			<Object width="100%" height="600" id="zzz" classid="clsid:C9320467-644F-43DA-B3FB-B23342B4EAF0"></Object>
		</div>
	</div>
</body>

</html>
